package com.example.demo.dao;

import com.example.demo.config.TestConfig;
import com.example.demo.model.UserTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class UserTestDao {

    public UserTest gitById(String id) {
        return new UserTest("1","zhangsan","123456",new Date());
    }

    @Autowired
    private TestConfig testConfig;

    public String getAccountBalance(){
        String wmsAccount = this.getWmnAcount();

        String restStr = this.testConfig.rest();

        UserTest userTest = new UserTest();

        String accountBalance = wmsAccount + "-" + "accountBalance-" + restStr + ",userTest:" +userTest.getName();
        return accountBalance;
    }

    public String getWmnAcount(){
        return "123";
    }
}
